onRejectSharedElements

open fun onRejectSharedElements(rejectedSharedElements: List<View>)(source)

Called after onMapSharedElements when transferring shared elements in. Any shared elements that have no mapping will be in rejectedSharedElements. The elements remaining in rejectedSharedElements will be transitioned out of the Scene. If a View is removed from rejectedSharedElements, it must be handled by the SharedElementListener.

Views in rejectedSharedElements will have their position and size set to the position of the calling shared element, relative to the Window decor View and contain snapshots of the View from the calling Activity or Fragment. This view may be safely added to the decor View's overlay to remain in position.

This method is not called for Fragment Transitions. All rejected shared elements will be handled by the exit transition.

Parameters

rejectedSharedElements

Views containing visual information of shared elements that are not part of the entering scene. These Views are positioned relative to the Window decor View. A View removed from this list will not be transitioned automatically.